package com.atguigu.gulimall.product.feign;

import com.atguigu.common.to.SkuEsModel;
import com.atguigu.common.utils.R;
import com.atguigu.gulimall.product.feign.fallback.SearchFeignServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @create: 2024/8/29
 * @author: gyhe10
 * @description: 远程调用 search 微服务的 Feign 接口
 **/

@FeignClient(value = "gulimall-search", fallback = SearchFeignServiceFallback.class)
public interface SearchFeignService {

    @PostMapping("/search/save/product")
    R productStatusToUp(@RequestBody List<SkuEsModel> skuEsModels);
}
